//
//  MsgSystemCell.swift
//  swiftim
//
//  Created by yangjian on 2023/6/13.
//

import Foundation

class MsgSystemCell : MsgBaseCell {
    
    let label = UILabel()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.configUserInfoViews()
    }
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    func configUserInfoViews(){
        //添加视图
        contentView.addSubview(label)
        //设置约束
        label.snp.makeConstraints { make in
            make.top.equalTo(MsgCellOtherLayoutAdapterConfig.share.systemRemindTopAndBottomEdgeSpacing)
            make.centerX.equalTo(contentView)
            make.width.lessThanOrEqualTo(SCREEN_WIDTH - (2 * MsgCellOtherLayoutAdapterConfig.share.systemRemindTopAndBottomEdgeSpacing))
            make.bottom.equalTo(-MsgCellOtherLayoutAdapterConfig.share.systemRemindTopAndBottomEdgeSpacing)
        }
        
        label.textColor = UIColor.darkGray
        label.numberOfLines = 0
        
    }
    
    override func bindFromModel(_ model : MsgCellBaseModel){
        super.bindFromModel(model)
        label.attributedText = model.show_text
    }
    
}
